<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>question_splice</title>
    <script src="../jquery-1.7.2.js"></script>
</head>
<body>
<ul class="num">
    <li>51</li>
    <li>23</li>
    <li>233</li>
    <li>1</li>
    <li>9.32</li>
</ul>
<script>
    $(function(){
        $('.num li').each(function(){
            var thisPrice = $(this).html();
            var firstChart = thisPrice.substring(1,2);
            var otherChart = thisPrice.substring(2);
            var price = '';
            for(var i = 0;i<thisPrice.length-1;i++){
                price += '？';
            }
         $(this).html('$'+firstChart+price);

        })
    })
</script>
</body>
</html>